<?php
require 'common/Utility.php';
require 'crud/CustomSecurity.class.php';
require 'crud/Groups.class.php';
require 'db/configuration.php';
require 'crud/Users.class.php';
if(isset($_GET['token'])){
	$users = new Users(con());
	if ($users->activateuser($_GET['email'], $_GET['token']) == 0){
		header("Location: activation_complete.php");
	} else {
		header("Location: missing_activation.php");
	}
} else if (isset($_GET['request'])){
	$users = new Users(con());
	$users->mailActivation($_GET['request']);
	header("Location: activation_sent.php");;
} else {
	header("Location: missing_activation.php");
}
?>